import request from '@/utils/request'

// 查询正式词库列表
export function listVocabulary(query) {
  return request({
    url: '/word-memory/vocabulary/list',
    method: 'get',
    params: query
  })
}

// 查询正式词库详细
export function getVocabulary(id) {
  return request({
    url: '/word-memory/vocabulary/' + id,
    method: 'get'
  })
}

// 新增正式词库
export function addVocabulary(data) {
  return request({
    url: '/word-memory/vocabulary',
    method: 'post',
    data: data
  })
}

// 修改正式词库
export function updateVocabulary(data) {
  return request({
    url: '/word-memory/vocabulary',
    method: 'put',
    data: data
  })
}

// 删除正式词库
export function delVocabulary(id) {
  return request({
    url: '/word-memory/vocabulary/' + id,
    method: 'delete'
  })
}
